/*#include<stdio.h>
#include<windows.h>
int main()
{
	int end = 1,sum,ininum,num,n,i,stu,reducestu,arrey[100];//num指剩下的学生数，reducestu指一圈下来减少的学生数,n是报数，i是计数
	int *group;
	stu = 0;
	reducestu = 0;
	while (end == 1)
	{
		printf_s("Please enter in a number below 100:");
		scanf_s("%d", &ininum);
		num = ininum;
		group = arrey;			//指针数组
		
		//Start to circle//
		group = arrey;
		i = 0;
		for (n = 1; i < ininum; n++, group++, i++)
		{
			*group = n;
			if (n == 3)
				n = 0;
			printf_s("%d\t", *group);
		}
		printf_s("\n");

		//开始循环报数
		group = arrey;
		i = 0;
		sum = 0;
		n = 1;
		while (sum != 1)
		{
			for (;i < ininum; n++, group++, i++)
			{
				if (*group == 0)
				{
						n--;
				}
				else
				{
					if (*group != 3)				//--------------------------------//
					{							//	注意						  //
						*group = n;				//		这两个				  //
					}							//              条件              //
					if (*group == 3)				//                   的           //
					{							//                      先后      //
						*group = 0;				//                           顺序 //
					}							//--------------------------------//
					if (n == 3)
					{
						n = 0;
					}
					printf_s("%d\t", *group);

				}

			}
			if (i = ininum)
			{
				group = arrey;
				i = 0;
			}

			//判断一个循环下来还剩几个人
			sum = 0;
			for (stu = 0; stu < ininum; stu++)
			{
				if (arrey[stu] != 0)
					sum++;
			}
		}

		//输出同学号
		for (i = 0, group = arrey; i < ininum; i++, group++)
		{
			if (*group != 0)
				printf_s("最后剩下第%d位同学\n", i + 1);
		}
		printf_s("\n");

		printf_s("\nenter 1 to continue or enter 0 to end it:");
		scanf_s("%d", &end);
	}
	system("pause");
	return 0;
}*/